package org.jeecg.config.sms;

import org.jeecg.common.util.EmailUtil;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class EmailConfig {

    @Value("${jeecg.email.host}")
    private String host;

    @Value("${jeecg.email.port}")
    private String port;

    @Value("${jeecg.email.user}")
    private String user;

    @Value("${jeecg.email.password}")
    private String password;

    @Bean
    public void initEmailConfig(){
        EmailUtil.setHost(host);
        EmailUtil.setPort(port);
        EmailUtil.setUser(user);
        EmailUtil.setPassword(password);
    }
}
